from django.db import models
from django.utils import timezone


class BaseModelMixin(models.Model):
    create_time = models.DateTimeField(db_comment="录入时间", default=timezone.now, blank=True, null=True)

    update_time = models.DateTimeField(db_comment="修改时间", blank=True, null=True)

    delete_time = models.DateTimeField(db_comment="删除时间", blank=True, null=True)

    is_delete = models.BooleanField(db_comment="是否被删除", default=False)

    class Meta:
        abstract = True
